Optimal. Leaf size=82 \[ -\frac {1}{4} \tan ^{-1}\left (\sqrt {3}-2 x^2\right )+\frac {1}{4} \tan ^{-1}\left (\sqrt {3}+2 x^2\right )-\frac {\log \left (1-\sqrt {3} x^2+x^4\right )}{8 \sqrt {3}}+\frac {\log \left (1+\sqrt {3} x^2+x^4\right )}{8 \sqrt {3}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 6, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {1373, 1108,
648, 632, 210, 642} \begin {gather*} -\frac {1}{4} \text {ArcTan}\left (\sqrt {3}-2 x^2\right )+\frac {1}{4} \text {ArcTan}\left (2 x^2+\sqrt {3}\right )-\frac {\log \left (x^4-\sqrt {3} x^2+1\right )}{8 \sqrt {3}}+\frac {\log \left (x^4+\sqrt {3} x^2+1\right )}{8 \sqrt {3}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 632
Rule 642
Rule 648
Rule 1108
Rule 1373
Rubi steps
\begin {align*} \int \frac {x}{1-x^4+x^8} \, dx &=\frac {1}{2} \text {Subst}\left (\int \frac {1}{1-x^2+x^4} \, dx,x,x^2\right )\\ &=\frac {\text {Subst}\left (\int \frac {\sqrt {3}-x}{1-\sqrt {3} x+x^2} \, dx,x,x^2\right )}{4 \sqrt {3}}+\frac {\text {Subst}\left (\int \frac {\sqrt {3}+x}{1+\sqrt {3} x+x^2} \, dx,x,x^2\right )}{4 \sqrt {3}}\\ &=\frac {1}{8} \text {Subst}\left (\int \frac {1}{1-\sqrt {3} x+x^2} \, dx,x,x^2\right )+\frac {1}{8} \text {Subst}\left (\int \frac {1}{1+\sqrt {3} x+x^2} \, dx,x,x^2\right )-\frac {\text {Subst}\left (\int \frac {-\sqrt {3}+2 x}{1-\sqrt {3} x+x^2} \, dx,x,x^2\right )}{8 \sqrt {3}}+\frac {\text {Subst}\left (\int \frac {\sqrt {3}+2 x}{1+\sqrt {3} x+x^2} \, dx,x,x^2\right )}{8 \sqrt {3}}\\ &=-\frac {\log \left (1-\sqrt {3} x^2+x^4\right )}{8 \sqrt {3}}+\frac {\log \left (1+\sqrt {3} x^2+x^4\right )}{8 \sqrt {3}}-\frac {1}{4} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,-\sqrt {3}+2 x^2\right )-\frac {1}{4} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,\sqrt {3}+2 x^2\right )\\ &=-\frac {1}{4} \tan ^{-1}\left (\sqrt {3}-2 x^2\right )+\frac {1}{4} \tan ^{-1}\left (\sqrt {3}+2 x^2\right )-\frac {\log \left (1-\sqrt {3} x^2+x^4\right )}{8 \sqrt {3}}+\frac {\log \left (1+\sqrt {3} x^2+x^4\right )}{8 \sqrt {3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.03, size = 83, normalized size = 1.01 \begin {gather*} \frac {i \left (\sqrt {-1-i \sqrt {3}} \tan ^{-1}\left (\frac {1}{2} \left (1-i \sqrt {3}\right ) x^2\right )-\sqrt {-1+i \sqrt {3}} \tan ^{-1}\left (\frac {1}{2} \left (1+i \sqrt {3}\right ) x^2\right )\right )}{2 \sqrt {6}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 65, normalized size = 0.79
method | result | size |
risch | \(\frac {\left (\munderset {\textit {\_R} =\RootOf \left (9 \textit {\_Z}^{4}+3 \textit {\_Z}^{2}+1\right )}{\sum }\textit {\_R} \ln \left (-3 \textit {\_R}^{3}+x^{2}+\textit {\_R} \right )\right )}{4}\) | \(32\) |
default | \(\frac {\arctan \left (2 x^{2}-\sqrt {3}\right )}{4}+\frac {\arctan \left (2 x^{2}+\sqrt {3}\right )}{4}-\frac {\ln \left (1+x^{4}-x^{2} \sqrt {3}\right ) \sqrt {3}}{24}+\frac {\ln \left (1+x^{4}+x^{2} \sqrt {3}\right ) \sqrt {3}}{24}\) | \(65\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 172 vs.
\(2 (64) = 128\).
time = 0.37, size = 172, normalized size = 2.10 \begin {gather*} -\frac {1}{12} \, \sqrt {6} \sqrt {3} \sqrt {2} \arctan \left (-\frac {1}{3} \, \sqrt {6} \sqrt {3} \sqrt {2} x^{2} + \frac {1}{3} \, \sqrt {6} \sqrt {3} \sqrt {2 \, x^{4} + \sqrt {6} \sqrt {2} x^{2} + 2} - \sqrt {3}\right ) - \frac {1}{12} \, \sqrt {6} \sqrt {3} \sqrt {2} \arctan \left (-\frac {1}{3} \, \sqrt {6} \sqrt {3} \sqrt {2} x^{2} + \frac {1}{3} \, \sqrt {6} \sqrt {3} \sqrt {2 \, x^{4} - \sqrt {6} \sqrt {2} x^{2} + 2} + \sqrt {3}\right ) + \frac {1}{48} \, \sqrt {6} \sqrt {2} \log \left (144 \, x^{4} + 72 \, \sqrt {6} \sqrt {2} x^{2} + 144\right ) - \frac {1}{48} \, \sqrt {6} \sqrt {2} \log \left (144 \, x^{4} - 72 \, \sqrt {6} \sqrt {2} x^{2} + 144\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.08, size = 70, normalized size = 0.85 \begin {gather*} - \frac {\sqrt {3} \log {\left (x^{4} - \sqrt {3} x^{2} + 1 \right )}}{24} + \frac {\sqrt {3} \log {\left (x^{4} + \sqrt {3} x^{2} + 1 \right )}}{24} + \frac {\operatorname {atan}{\left (2 x^{2} - \sqrt {3} \right )}}{4} + \frac {\operatorname {atan}{\left (2 x^{2} + \sqrt {3} \right )}}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.47, size = 64, normalized size = 0.78 \begin {gather*} \frac {1}{24} \, \sqrt {3} \log \left (x^{4} + \sqrt {3} x^{2} + 1\right ) - \frac {1}{24} \, \sqrt {3} \log \left (x^{4} - \sqrt {3} x^{2} + 1\right ) + \frac {1}{4} \, \arctan \left (2 \, x^{2} + \sqrt {3}\right ) + \frac {1}{4} \, \arctan \left (2 \, x^{2} - \sqrt {3}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.04, size = 53, normalized size = 0.65 \begin {gather*} -\mathrm {atan}\left (-\frac {x^2}{2}+\frac {\sqrt {3}\,x^2\,1{}\mathrm {i}}{2}\right )\,\left (\frac {1}{4}+\frac {\sqrt {3}\,1{}\mathrm {i}}{12}\right )-\mathrm {atan}\left (\frac {x^2}{2}+\frac {\sqrt {3}\,x^2\,1{}\mathrm {i}}{2}\right )\,\left (-\frac {1}{4}+\frac {\sqrt {3}\,1{}\mathrm {i}}{12}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________